CIL: Chess In Lisp

By chessnotation@me.com
Revised 2011.04.13

----------

Abstract:

CIL (Chess In Lisp) is a chess programing toolkit written in Common Lisp.  The current effort is a completely new version of the original Chess In Lisp exploratory work done back in the 1980s.

----------

License:

The Chess In Lisp toolkit is currently implemented as a single source file: "CIL.lisp" and is licensed using the Simplified BSD License (also known as the FreeBSD License).

----------

Development environment:

The CIL toolkit was written entirely on an Apple Macinstosh (model MacPro1,1 2.66 GHz Dual-Core Intel Xeon) under the Mac OS/X 10.6 operating system based on OpenBSD Unix and Mach.  Testing was performed using a variety of PowerPC and Intel CPUs, both 32 bit and 64 bit.  Testing on Linux systems was done under the Ubuntu 10.10 release.

----------

Common Lisp Processors:

Unlike the original version of the toolkit which was tested on only one platform with only one implementation of Common Lisp, the new version has been tested on several POSIX platforms (e.g. Linux, Mac OS/X) and with the use of four different Common Lisp implementations all of which are freely available.  CIL has been run with each of the following: ccl (Clozure Common Lisp, both 32 and 64 bit versions), cmucl (Carnegie Mellon University Common Lisp), and sbcl (Steel Bank Common Lisp).

The toolkit does not at present run properly under gcl (GNU Common Lisp) because of a bug in the gcl "listen" routine.  If anyone maintaining gcl fixes its listen routine, let me know and I'll try it again.  Further testing has shown that gcl will occasionally lose its mind with deep searches; it's probably better to use a different Lisp.

No testing by the developer has been done with non-POSIX platforms (e.g., Microsoft Windows), and none is planned.  It may be possible to get a Common Lisp processor running under Cygwin and so the CIL toolkit would (probably) also run under Cygwin.  This is a task that is left for others.

Some helpful sites for downloading free Lisp processors (alphabetically ordered):

ccl   http://trac.clozure.com/ccl       (Avaliable in both 32 and 64 bit versions)
clisp http://www.clisp.org/             (Uses a byte code compiler)
cmucl http://www.cons.org/cmucl/        (Well supported with an active mailing list)
sbcl  http://www.sbcl.org/              (Preferred by many for its speed)

The only other software needed is a terminal emulator for interactive execution.  A terminal emulator that supports ANSI escape sequences for colorized text output will support color chessboard graphics generated by the toolkit.

----------

Usage:

For now, just add your Lisp source code to the bottom of the CIL source; a real package definition is coming eventually.  Several sample routines are already in place adjacent to the end of the CIL.lisp source file.  To locate the boundary between the toolkit and the samples, search for the CIL initialization call: "(create-acs)".

The actual activation sequence depends on the choice of Lisp processor.  A suggestion that seems to work well on most or all Lisp processors is:

1. Start the Lisp processor
2. Enter: (compile-file #P"<your-source-file-pathname>")
3. Quit the Lisp processor
4. Start the Lisp processor again
5. Enter: (load #P"<your-compiled-file-pathname>")
6. Have fun

It is advised to always run a compiled version of the toolkit.  Due to a much slower speed, interpretation is not well suited to the extensive calculation required by chess data manipulation.

----------

Documentation:

"May the (program) source be with you."

Also, see the various text files in the Documentation directory.

----------

Current work areas, roughly in order:

1. Documentation improvements.

2. PGN parsing operations.

3. EPD operations.

4. Book and tablebase operations.

5. A simple console command interface.

6. Investigation of multithreading issues.

7. GUI interfacing (with xboard, most likely).

8. Pattern/instance engine.

----------

Dangers:

WARNING!  Currently the source is undergoing near continuous change, so beware of the shifting sands.

CAUTION!  If you spend too much time with this, you might get hooked on Lisp.
